package com.fg.cloud.common.construction;

import java.io.Serializable;
import java.util.List;

/**
 * Description:商品分类树形结构
 * @author 陈银龙
 * @date 2017年8月10日下午4:18:21
 */
public class CategoryTree implements Serializable, Comparable<CategoryTree>{

	private static final long serialVersionUID = -2408078038630966972L;

	private Long id;
	
	/**厂商ID */
    private Long facId;
    
    /** 小图标*/
    private String IcoName;

    /**分类编码 */
    private String number; 
    
    /**分类名称 */
    private String name; 

    /**父级分类ID */
    private Long pid; 

    /**展示顺序 */
    private Integer seq; 
    
	/**子对象集合 */
    private List<CategoryTree> children;

	public String getIcoName() {
		return IcoName;
	}

	public void setIcoName(String icoName) {
		IcoName = icoName;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getFacId() {
		return facId;
	}

	public void setFacId(Long facId) {
		this.facId = facId;
	}
	
	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public List<CategoryTree> getChildren() {
		return children;
	}

	public void setChildren(List<CategoryTree> children) {
		this.children = children;
	}

	@Override
	public int compareTo(CategoryTree o) {
		int i = o.getSeq() - this.getSeq();
		if (i >= 0) {
			return -1;
		} else {
			return 1;
		} 
	}
    
    
}
